package com.magicalcoder.youyamvc.app.common;

import com.magicalcoder.youyamvc.core.common.dto.KeyValue;

/**
 * Created by www.magicalcoder.com on 2015/7/15.
 * 799374340@qq.com
 */
public interface StatusConstant {


    KeyValue EXCEPTION_ERROR_CODE = new KeyValue("-9000","出现异常");
    //    KeyValue ERROR_CODE_EXCEPTION_BUSINESS = new KeyValue("-9001","");
    KeyValue EXCEPTION_ERROR_CODE_NULL_POINT = new KeyValue("-9002","空指针异常");
    KeyValue EXCEPTION_ERROR_CODE_ILLEGAL_ARGUMENT = new KeyValue("-9003","入参异常");
    KeyValue EXCEPTION_ERROR_CODE_SQL = new KeyValue("-9004","sql异常");

    //用户模块错误码1开头
    KeyValue USER_ = new KeyValue("1000","用户开头异常");

    //商品模块错误码2开头
    KeyValue GOODS_ = new KeyValue("2000","");

    //订单模块错误码3开头
    KeyValue ORDER_NO_STORE = new KeyValue("3000","库存不足");

    //市场模块错误码4开头
    KeyValue MARKETING_ = new KeyValue("4000","");

    //管理后台模块错误码8开头
    KeyValue ADMIN_ = new KeyValue("8000","");

    int SUCCESS = 0;
    int VALID_PARAM = -1;//入参错误或不合法
    int NEED_LOGIN = -201;//未登录
    int LOGIN_FAIL = -202;//登录失败


    int API_SIGN_ERROR = -301;//第三方api签名验证错误
    int API_SING_EXPIRE = -302;//第三方api请求过期
    int API_SIGN_VALID_FROM = -303;//第三方api from不存在
    int API_SIGN_LOST_PARAMS = -304;//第三方api签名丢失参数

    int ERROR = 500;
}
